/*  VisualGroup JavaScript prototype Classes, version 0.1
 *  (c) 2008 Bill Vison <vison_ruan@126.com>
 *
 *
/*--------------------------------------------------------------------------*/
using("Vsg.Component");
/**
 * @param $args
 * @param $_panelAttr --- the attribue for defined attr, is use default attribute if it's null
 */
Vsg.Component.TitlePanel = function($args , $panelAttr) {
	
	if ($args == null) {
		throw "基本参数不能为空";
	}
	
	$_title = "[没有设定标题]";
	
	$_title = $args.title;
	

	// --- defind property ---
	var $_attr = new Object();
	$_attr.region = "north";
	$_attr.margins = {left:5,top:5,right:5,bottom:2};
	$_attr.bodyStyle = "padding:5px";
	$_attr.height = 25;
	
	if ($panelAttr != null) {
		$_attr = $panelAttr;
	}
	$_attr.html = "<b>"+ $_title +"</b>";
	// ---- construct method ----
	
	// ---- call the parent method ---

	Vsg.Component.TitlePanel.superclass.constructor.call(this,$_attr);
	
}
Vsg.Component.TitlePanel.TitlePanelException = Ext.extend(Exception.CommonException,{
	name:"Vsg.Component.TitlePanel.TitlePanelException",
	constructor:function($message , $name ,$value) {
		Vsg.Menu.MenuStyleViewerRunnable.ViewerNullPointException.superclass.constructor.apply(this, arguments);
	}
});


// --- set the override
var $overrideMethods = new Object();

// extend panel
Ext.extend(Vsg.Component.TitlePanel, Ext.Panel, $overrideMethods);




